﻿using System;
using System.Collections.Generic;

namespace cz.zcu.PreSti.Components
{
    public class Mixer : RunnableComponent
    {
        #region Fields
        private string[] values = new string[4] { "1", "2", "3", "4" };
        private string outputValue = "";

        #endregion

        #region properties

        public virtual string[] Values
        {
            get
            {
                return values;
            }
            set
            {
                values = value;
            }
        }

        #endregion

        public Mixer(IPresentation p)
            : base(p, 4, 1, 0, 1)
        {
        }

        public override void trigIn(int n)
        {
            base.trigIn(n);
            outputValue = Values[n];
            trigOut(0);
        }

        public override object  getValueFromGetter(int getterN)
        {
            return outputValue;
        }        

        public override void update()
        {
        }

    }
}
